package com.xbjtech.controller;

import com.xbjtech.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//import com.xbjtech.model.User;
import com.xbjtech.service.UserService;

@Controller
public class UserController {

	@Autowired
	UserService userService;

	@GetMapping("/save")
	@ResponseBody
	public String save(User user) {
		try {
			userService.insert(user);
			return "{'success':'true'}";
		} catch (Exception e) {
		}
		return "{'success':'false'}";
	}
}
